Optimal. Leaf size=93 \[ -\frac {\sqrt {a} (2 a+3 b) \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{2 b^2 d (a+b)^{3/2}}+\frac {a \tan (c+d x)}{2 b d (a+b) \left ((a+b) \tan ^2(c+d x)+a\right )}+\frac {x}{b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3187, 470, 522, 203, 205} \[ -\frac {\sqrt {a} (2 a+3 b) \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{2 b^2 d (a+b)^{3/2}}+\frac {a \tan (c+d x)}{2 b d (a+b) \left ((a+b) \tan ^2(c+d x)+a\right )}+\frac {x}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 205
Rule 470
Rule 522
Rule 3187
Rubi steps
\begin {align*} \int \frac {\sin ^4(c+d x)}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {x^4}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {a \tan (c+d x)}{2 b (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )}-\frac {\operatorname {Subst}\left (\int \frac {a+(-a-2 b) x^2}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )} \, dx,x,\tan (c+d x)\right )}{2 b (a+b) d}\\ &=\frac {a \tan (c+d x)}{2 b (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )}+\frac {\operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{b^2 d}-\frac {(a (2 a+3 b)) \operatorname {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (c+d x)\right )}{2 b^2 (a+b) d}\\ &=\frac {x}{b^2}-\frac {\sqrt {a} (2 a+3 b) \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{2 b^2 (a+b)^{3/2} d}+\frac {a \tan (c+d x)}{2 b (a+b) d \left (a+(a+b) \tan ^2(c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.86, size = 93, normalized size = 1.00 \[ \frac {-\frac {\sqrt {a} (2 a+3 b) \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{(a+b)^{3/2}}+\frac {a b \sin (2 (c+d x))}{(a+b) (2 a-b \cos (2 (c+d x))+b)}+2 (c+d x)}{2 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.48, size = 492, normalized size = 5.29 \[ \left [\frac {8 \, {\left (a b + b^{2}\right )} d x \cos \left (d x + c\right )^{2} - 4 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 8 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d x + {\left ({\left (2 \, a b + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - 5 \, a b - 3 \, b^{2}\right )} \sqrt {-\frac {a}{a + b}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right )}{8 \, {\left ({\left (a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d\right )}}, \frac {4 \, {\left (a b + b^{2}\right )} d x \cos \left (d x + c\right )^{2} - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} d x + {\left ({\left (2 \, a b + 3 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - 5 \, a b - 3 \, b^{2}\right )} \sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, {\left ({\left (a b^{3} + b^{4}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{2} b^{2} + 2 \, a b^{3} + b^{4}\right )} d\right )}}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.19, size = 140, normalized size = 1.51 \[ -\frac {\frac {{\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )} {\left (2 \, a^{2} + 3 \, a b\right )}}{{\left (a b^{2} + b^{3}\right )} \sqrt {a^{2} + a b}} - \frac {a \tan \left (d x + c\right )}{{\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + a\right )} {\left (a b + b^{2}\right )}} - \frac {2 \, {\left (d x + c\right )}}{b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.27, size = 140, normalized size = 1.51 \[ \frac {a \tan \left (d x +c \right )}{2 d b \left (a +b \right ) \left (a \left (\tan ^{2}\left (d x +c \right )\right )+\left (\tan ^{2}\left (d x +c \right )\right ) b +a \right )}-\frac {a^{2} \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{d \,b^{2} \left (a +b \right ) \sqrt {a \left (a +b \right )}}-\frac {3 a \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{2 d b \left (a +b \right ) \sqrt {a \left (a +b \right )}}+\frac {\arctan \left (\tan \left (d x +c \right )\right )}{d \,b^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.48, size = 109, normalized size = 1.17 \[ \frac {\frac {a \tan \left (d x + c\right )}{a^{2} b + a b^{2} + {\left (a^{2} b + 2 \, a b^{2} + b^{3}\right )} \tan \left (d x + c\right )^{2}} - \frac {{\left (2 \, a^{2} + 3 \, a b\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{{\left (a b^{2} + b^{3}\right )} \sqrt {{\left (a + b\right )} a}} + \frac {2 \, {\left (d x + c\right )}}{b^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 15.23, size = 1959, normalized size = 21.06 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________